home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Texteditors
/
Origami
/
install_origami
< prev
next >
Wrap
Text File
|
1996-09-26
|
7KB
|
305 lines
(set @app-name "Origami Folding Editor")
;{{{}}}
;{{{ message, when started from CLI
(if (= @icon "")
(
message (
"Please start the installation with the install-icon next time."
"This will set all paths and names correct."
)
)
(
(set @execute-dir (pathonly @icon))
)
)
;}}}
(complete 0)
;{{{ binaries
;{{{ print new version number
;(set x (getversion ("origami")))
;(set x1 (/ x 65536))
;(set x2 (- x (* x1 65536)))
(set y (getversion ("bin/origami")))
(set y1 (/ y 65536 ) )
(set y2 (- y (* y1 65536 ) ) )
(if
(not
(askbool
(prompt
"Do you want to install the new origami version ?\n"
; ("Your old version is %ld.%ld.\n" x1 x2)
("The new version is %ld.%ld.\n" y1 y2)
"Warning : This display shows only the first two numbers of the "
"Origami version. Please use the CLI Version command to get "
"the correct version number !"
)
(help
"This requester enables you to check the old and new versions "
"and install only a version that is newer than your old."
)
(default 1)
)
)
(
(exit (quiet))
)
)
;}}}
(working "Copying binaries...")
(copyfiles
(prompt "Installing binaries.")
(help "You can choose all binaries you would like to install.\n"
"The various parts of the Origami distribution are :\n\n"
"Origami : the main editor binary\n\n"
"Keybind : the OCL-compiler. You will need this binary when you want to change the default keybinding.\n\n"
"Oripager : a pager you can use to display files in origamis text display area blockwise.\n\n"
"Dirfold : a tool to make a file containing filed-folds for a directory.\n\n"
"Viewrc : a tool to view the rc-files (compiled binding files)\n\n"
"Orisort : a special sort used by keybind to sort the describe-bindings-section\n\n"
"GetKeyCode : a tool to get the keycode of keyboard keys. This is useful, when you make your own bindings\n\n"
@copyfiles-help
)
(source "bin")
(dest "C:")
(pattern "~(.#?)")
(infos)
(confirm average)
)
;}}}
(complete 20)
;{{{ rc-files
;{{{ test existance of .origamirc file & create ...
(if (NOT (exists "bin/.origamirc"))
(
(working "Making rc-file using keybind.\nPlease wait ...")
(set olddir @execute-dir)
(set @execute-dir ("%s/bindings" olddir))
(run "/bin/keybind -O -o /bin/.origami -L \"/bindings;fun\" amiga.keys"
(prompt "The rc-files do not exist. Create them ?\n"
"Making amiga.keys bindings using the keybind command.\n"
"Please wait, this may take some time.")
(help "You will need the rc files (compiled bindings) to run origami.")
(confirm)
)
(set @execute-dir olddir)
)
)
;}}}
;{{{ test existance of .origamirc file & quit ...
(if (NOT (exists "bin/.origamirc"))
(abort "There is still no .origamirc file (creation error ??)"
"New origami version will not work !"
)
)
;}}}
(complete 40)
;{{{ set rcdir
(set rcdir
(askdir
(prompt "Please select the rc directory." )
(help
"In the rc directory the compiled bindings will be installed !\n"
"You will need them to run origami !\n\n"
"If you select a directory different to S:, you will have to set the"
"ORIPATH environment variable or use the -R option.\n\n"
@askdir-help
)
(default "S:")
)
)
(set @default-dest rcdir)
;}}}
;{{{ copy rc files
(working "Copying rc-files")
(copyfiles
(prompt "Please select the rc directory." )
(help
"In the rc directory the compiled bindings will be installed !\n"
"You will need them to run origami !\n\n"
"If you select a directory different to S:, you will have to set the"
"ORIPATH environment variable or use the -R option.\n\n"
@copyfiles-help
)
(source "bin")
(pattern ".#?")
(dest "S:")
(confirm)
)
;}}}
;}}}
(complete 60)
;{{{ binding-files
(if
(askbool
(prompt "Do you want to install the binding-files ?")
(help
"The binding files are the source files for keybind.\n"
"You will need them to remake the rc-files.\n\n"
"You will need them to remake the rc-files.\n\n"
"If you do not want to change the standard bindings, you can skip this part.\n\n"
@askbool-help
)
(default 0)
)
(
;{{{ set binddir
(set binddir
(askdir
(prompt "Please select the binding directory.")
(help
"The binding files are the source files for keybind.\n"
"You will need them to remake the rc-files.\n\n"
"If you do not want to change the standard bindings, you can skip this part."
@askdir-help
)
(newpath)
(default "S:origami")
)
)
;}}}
;{{{ make binddir if not exists
(if (not (exists binddir))
(makedir binddir
(prompt "Making directory " binddir )
)
)
;}}}
;{{{ make binddir if not exists
(if (not (exists ("%s/emacs-fun" binddir)))
(makedir ("%s/emacs-fun" binddir)
(prompt "Making directory " binddir "\emacs-fun" )
)
)
;}}}
;{{{ make binddir if not exists
(if (not (exists ("%s/modeori-fun" binddir)))
(makedir ("%s/modeori-fun" binddir)
(prompt "Making directory " binddir "\modeori-fun" )
)
)
;}}}
;{{{ copy bindings
(working "Copying binding files ...")
(copyfiles
(source "bindings/amiga.keys")
(dest binddir)
)
(copyfiles
(source "bindings/emacs.keys")
(dest binddir)
)
(copyfiles
(source "bindings/fun")
(pattern "#?")
(dest binddir)
)
(copyfiles
(source "bindings/emacs-fun")
(pattern "#?")
(dest ("%s/emacs-fun" binddir))
)
(copyfiles
(source "bindings/modeori-fun")
(pattern "#?")
(dest ("%s/modeori-fun" binddir))
)
;}}}
)
)
;}}}
(complete 80)
;{{{ set environment variables
;{{{ ORIPATH
(if (<> (rcdir) ("S:"))
(
(textfile
(dest "ENVARC:ORIPATH")
(append rcbin)
)
(run ("setenv ORIPATH " rcbin))
)
)
;}}}
(complete 85)
;{{{ ORIARG
(set ststr1
(askstring
(prompt "You can now enter your standard options.")
(help
"The options a equivalent with the command line options.\n"
"Some of them like -C are always useful.\n"
"If you are not familiar with origamis command line options, read the man-page.\n"
"The options will be stored in the environment variable ORIGAMIOPTS.\n\n"
@askstring-help
)
(default "-C")
)
)
(if (<> ststr1 "")
(
(textfile
(dest "ENVARC:ORIGAMIOPTS")
(append ststr1)
)
(run ("setenv ORIGAMIOPTS %s" ststr1))
)
)
;}}}
(complete 90)
;{{{ SHELL
(set ststr2
(askstring
(prompt "You can now enter the command to be executed by the create subshell command.")
(help
@askstring-help
)
(default "newshell Con:0/11/640/200/Shell/Close")
)
)
(if (<> ststr2 "")
(
(textfile
(dest "ENVARC:SHELL")
(append ststr2)
)
(run ("setenv SHELL %s" ststr2))
)
)
;}}}
;}}}
(complete 100)
;{{{ display README.FIRST
(if (exists "Sys:Utilities/more" (noreq))
(
(run "run Sys:Utilities/more README.FIRST")
)
(
(message
"Please read the README.FIRST file !\n"
"Thanks for installing origami."
)
)
)
;}}}